import java.util.Arrays;

public class Text {
    public static void swap(MyValue myValue1, MyValue myValue2) {
        int tem = myValue1.val;
        myValue1.val = myValue2.val;
        myValue2.val = tem;

    }
    public static void main6(String[] args) {
        MyValue myValue1 = new MyValue();
        myValue1.val = 10;
        MyValue myValue2 = new MyValue();
        myValue2.val = 20;

        //如何交换对象里的值， 传入地址交换值
        swap(myValue1, myValue2);
        System.out.println(myValue1.val + " " + myValue2.val);
    }
    public static void main(String[] args) {
        MyDate myDate1 = new MyDate();
        MyDate myDate2 = new MyDate();
        myDate1.SetDate(2025, 06, 04);//输入数据用逗号隔开
        myDate1.PrintDate();
    }
    public static void main4(String[] args) {
        WashMachine WashMachine1 = new WashMachine();
        WashMachine1.brand = "美的";
        WashMachine1.washsClothes();
        System.out.println(WashMachine1.brand);
    }
    public static void main3(String[] args) {
        int[][] array = new int[2][];//不规则数组
        array[0] = new int[3];//第零行有3列
        array[1] = new int[5];//第1行有5列
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }
    }
    public static void main2(String[] args) {
        int[][] array = {{1,2,3}, {4,5,6}};
        for (int i = 0; i < array.length; i++) {//行数
            for (int j = 0; j < array[i].length; j++) {//列数
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }
        for (int[] temp : array) {//行数是一维数组提取出来
            for (int x : temp) {//再将一维数组的每个元素提取出来
                System.out.print(x + " ");
            }
            System.out.println();
        }
        System.out.println(Arrays.deepToString(array));//二维数组的格式化 要加上deep并且t要大写

    }
}
